import { BuffType, EventType, IntervalTimeUnit } from "../../types/L_Type";
import EventX from "./EventX";





/** Buff DeBuff事件 */
export default class XBuff extends EventX {


  startCallback:Function
  endCallback:Function


  constructor(
      buffType:BuffType,
      lastedUnit: IntervalTimeUnit,
      lastedVal: number,
      startCallback:Function,
      endCallback:Function
  ) {
      //当作一次循环来执行buffx事件
      super(buffType,lastedUnit,lastedVal,1)
      this.startCallback=startCallback
      this.endCallback=endCallback
  } 


  public start(): void {
    //在开始直接调用
    this.startCallback()
  }
  public run(): void {
    //buff期间还可以做一些啥动作？  TODO
  }
  public end(): void {
    //结束需要调用回收
    this.endCallback()
  }
 
 
 
 
 


  
}  
